package com.springboot.astra.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.springboot.astra.bean.Permission;
import com.springboot.astra.bean.Resource;
import com.springboot.astra.bean.Role;

import java.util.List;

public interface RolesMapper {
    Role getOneById(Integer id);
    Role getOneByResource(Integer id);
    List<Role> getAll();
    List<Permission> getPermission(Integer id);
    List<Resource> getResource(Integer id);
    IPage<Role> selectPageVo(Page<Role> page);
    void insertRole(Role role);
    void updateOneById(Role role);
    void deleteOneById(Integer id);
    List<Role> getOnlyRoles();
}
